package com.example.panpan.dao;

import com.example.panpan.domain.GoodsCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface GoodsCategoryDao {
    /**
     * 获取列表goodsCategory
     *
     * @param pageSize
     * @param start
     * @param categoryId
     * @return
     */
    ArrayList<GoodsCategoryEntity> goodsCategoryList(@Param("pageSize") int pageSize, @Param("start") int start,@Param("categoryId") String categoryId);

    /**
     * 获取goodsCategory列表的总量
     *
     * @param pageSize
     * @param start
     * @param categoryId
     * @return
     */
    Integer goodsCategorySize(@Param("pageSize") int pageSize, @Param("start") int start,@Param("categoryId") String categoryId);

    /**
     * 新建商品分类信息
     *
     * @param goodsCategoryEntity
     */
    void insertGoodsCategory(@Param("goodsCategoryEntity") GoodsCategoryEntity goodsCategoryEntity);

    /**
     * 更新商品分类信息
     *
     * @param goodsCategoryEntity
     */
    void updateGoodsCategory(@Param("goodsCategoryEntity") GoodsCategoryEntity goodsCategoryEntity);

    /**
     * 删除商品分类信息
     *
     * @param groupId
     */
    void deleteGoodsCategory(@Param("groupId") List<String> groupId);


    /**
     * 通过parentId得到goodsCategory列表
     *
     * @param parentId
     * @return
     */
    List<GoodsCategoryEntity> goodsCategoryByParentId(@Param("parentId") int parentId);


}
